const http=require('http')
const server =http.createServer()
server.on('request',(req,res)=>{
console.log(req.url,req.method)
res.setHeader('Content-Type','text/html;charset=utf-8')
res.end('结束')
})
server.listen(8080,()=>{
    console.log('http://127.0.0.1:8080')
})